A CODEC can perform various types of transformations and reverse transformations on audio and visual data. The transformations may include conversion from analog data to digital data, compression of digital data, and other transformations such as higher-order transformations described below. The transformed (or encoded) data is often transmitted from sending devices over networks such as the Internet to receiving devices. The sending devices use the CODEC to transform the data, and the receiving devices use the CODEC to perform the reverse transformations, resulting in output data. CODEC is an overloaded term that can stand for both Coder/Decoder and Compression/Decompression Module. The two definitions come from the usefulness of CODECs for both conversion between analog and digital data and compression and decompression of digital data. Different CODECs are optimized for different situations; for example, some audio CODECs are better for transforming speech, while others are better for transforming music. Likewise, some video CODECs are better for transforming real-time videoconferencing information, while others are better for transforming streaming video.
CODECs often expose a variety of parameters that can be adjusted to customize the transformation for a particular situation. Typical parameters that are exposed by a CODEC include sampling rate, bits per sample, latency, bandwidth, average packet size, lookahead, frame size, average bytes per second, channels, samples per frame, fixed vs. variable rate, block alignment, jitter compensation/control, input and output buffer size, use of error correction, error correction buffer size, bandwidth checking, packet loss checking, and so on. A CODEC generates digital data that is divided into samples, each corresponding to a sampling of the analog input. The sampling rate indicates how often the analog data is to be sampled. A higher sampling rate increases the precision of the transformation and allows capturing more accurate information about higher frequencies. Bits per sample indicates the number of bits that are used to encode each sample. Higher bits per sample results in a higher quality of data, since more information is retained about each sample. Latency indicates the amount of time that data takes to get from the sender device to the receiver. CODECs, Internet gateways, data buffering, and analysis of audio and visual data such as echo cancellation can all cause latency. Too little latency will cause breaks in the encoded data during network congestion, while too much latency will cause a perceived delay, which presents problems when the encoded data needs to be played back in real time (e.g., during a conversation). Bandwidth indicates the amount of data that can be transmitted along a communications channel in a given period of time. Different encoding and compression techniques produce transformed data of various sizes (i.e., higher sampling rates and bits per sample generally require more bytes in the transformed data). The larger the transformed data, the more bandwidth it will consume when it is transmitted.
A CODEC may also perform higher-order transformations on the data to improve the quality or reduce bandwidth of the encoded data and may expose parameters to influence the result of these transformations. These higher-order transformations may be based on Voice Activity Detection (VAD) and Silence Suppression (SS) analyses. A CODEC applies VAD and SS analysis to optimize speech by reducing the amount of encoded data transmitted when no one is speaking. An exposed parameter may be a volume threshold that indicates that data below the threshold is considered noise and is treated as silence, while data above the threshold is considered speech. A CODEC may also perform analysis to detect background noise in order to avoid sending data that is not part of a foreground conversation to improve the quality of the data received and reduce the bandwidth of the transmission. For example, music or a horn blowing in the background of a conversation make it difficult to hear the conversation, so many CODECs perform analysis to identify these types of sounds and transform the data to remove the sounds. The CODEC may perform all of the analysis itself, or other devices may participate to produce the resulting transformed data. For example, systems may contain a separate noise cancellation device, a special microphone, or audio and visual data analysis software that participates with the CODEC to transform the audio and visual data.
The optimization normally performed by a CODEC, such as reducing background noise and compression, is not always well suited for emergency situations. For example, during a 911 call, it may be desirable for the 911 operator to hear what is going on in the background, particularly if the caller is in medical distress and is unable to communicate. During a crime, background information may allow the 911 operator to assess the level of the threat so that appropriate law enforcement units can be dispatched. However, current CODECs are generally optimized to filter out this kind of background information such that it would not be received and heard by the 911 operator.